CC :=gcc
log :=thirdparty/log/log.c thirdparty/log/log.h
log_test: test/log_test.c $(log)
	-$(CC) $^ -o $@ -Ithirdparty
	-./$@
	-rm $@

app_common :=app/app_common.h app/app_common.c
app_common_test: test/app_common_test.c  $(log) $(app_common)
	-$(CC) $^ -o $@ -Ithirdparty -Iapp
	-./$@
	-rm $@

app_buffer:=app/app_buffer.c app/app_buffer.h
app_buffer_test:test/app_buffer_test.c $(log) $(app_buffer)
	-$(CC) $^ -o $@ -Ithirdparty -Iapp
	-./$@
	-rm $@

cjson:=thirdparty/cJSON/cJSON.c thirdparty/cJSON/cJSON.h
cjson_test:test/cjson_test.c $(log) $(cjson)
	-$(CC) $^ -o $@ -Ithirdparty -Itest
	-./$@
	-rm $@